/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session04;

import java.util.PriorityQueue;

/**
 *
 * @author macbookpro
 */
public class PriorityQueueTest {

    public static void main(String[] args) {
        PriorityQueue pq = new PriorityQueue();

        pq.add(new Student("R0001", "abc"));
        pq.add(new Student("R0002", "xyz"));
        pq.add(new Student("R0003", "123"));

        while (!pq.isEmpty()) {
            System.out.println(pq.poll());
        }
    }
}
